<?php 
namespace app\Home\controller;
use think\Controller;
use think\Db;
use think\Session;
use think\Cookie;

class Common extends Controller
{
	public function headerData(){
		$data['userid'] = Session::get('id');	
		$data['username'] = Session::get('username');
		if(!empty($data['userid'])){		
			$data['info'] = "欢迎回来";
			$data['hello'] = "您好";
			$data['out'] = "退出";		
		}else{
			$data = [];
		}
		return $data;
	}
}